<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<p>
    <h1>个人介绍</h1>
    <p>我是{{ name }}</p>
    <p>今年{{ age }}</p>
    <p>我喜欢{{ hobby }}</p>
    <p>我更喜欢的是{{ hobby.2 }}</p>

{#<p>#}
{#    {% ifequal age 18 %}#}
{#        18岁#}
{#    {% endifequal %}#}
{#</p>#}

{#<p>#}
{#    {% ifequal age 19 %}#}
{#        19岁#}
{#    {% endifequal %}#}
{#</p>#}

{#<p>#}
{#    {% for zz in hobby %}#}
{#        {{ forloop.counter }}.{{ zz }}#}
{#        {{ forloop.counter0 }}.{{ zz }}#}
{#        {{ forloop.parentloop }}.{{ zz }}#}
{#        {{ forloop.revcounter }}.{{ zz }}#}
{#    {% endfor %}#}
{#</p>#}

<p>
    {% for zz in hobby %}
        {% if forloop.first %}
            <p style="background-color: red">{{ forloop.counter }}.{{ zz }}</p>
        {% elif forloop.last %}
            <p style="background-color: green">{{ forloop.counter }}.{{ zz }}</p>
        {% else %}
            <p style="background-color: blue">{{ forloop.counter }}.{{ zz }}</p>
        {% endif %}
    {% endfor %}
</p>
</body>
</html>